package com.juhuixing.gateway.model;

/**
 * 功能描述: 响应code
 * @author: 刘猛
 * @date: 2019/4/24 10:14
 **/
public enum ResponseCode {
	SUCCESS_CODE(200,"成功"),
	PARAM_ERROR_CODE(400,"参数错误"),
	ACCESS_ERROR_CODE(401,"限制调用"),
	TOKEN_TIMEOUT_CODE(402,"token过期"),
	NO_AUTH_CODE(403,"禁止访问"),
	NOT_FOUND(404,"资源没找到"),
	DOWNGRADE(406,"服务器降级中"),
	SERVER_ERROR_CODE(500,"服务器资源错误"),
	INVALID_TOKEN(501,"无效的token"),
	REQUIRE_TOKEN(502,"需要完整的token"),
	SMS_CODE_ERR(504,"验证码错误"),
	LIMIT_CODE_ERR(505,"访问速度太频繁"),

	ONE_PET_TYPE_FOR_ONE_ADOPT(506,"一种类型的宠物只能领养一个哦"),

	PET_ALREADY_BE_ADOPTED(507,"该宠物已经被其他用户领取"),

	ALREADY_ADOPTED_BY_BEADOPTED_USER(508,"被领养的用户已经领养过你了"),
	;
	private int code;
	private String desc;
	public void setCode(int code) {
		this.code = code;
	}
	public int getCode() {
		return code;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getDesc() {
		return desc;
	}

	ResponseCode(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
}
